package com.RedRiver.hospitalsystem.record_service.client;

import com.RedRiver.hospitalsystem.record_service.client.param.CreatePrescriptionParam;
import com.RedRiver.hospitalsystem.record_service.client.param.CreateSerialParam;
import com.RedRiver.hospitalsystem.record_service.client.result.GetPersciptionResult;
import com.RedRiver.hospitalsystem.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.Valid;

@FeignClient(contextId = "PrescriptionClient",name="record-service",path="recordService/prescription")
public interface PrescriptionClient {

    @PostMapping("/createPersciption")
    public Result<?> createPersciption(@RequestBody @Valid CreatePrescriptionParam prescriptionParam);

    @GetMapping("/getPersciptionByid")
    public Result<GetPersciptionResult> getPersciptionByid(Integer id);
}
